gridpack::utility::LocalTimer Class Reference

#include <local_timer.hpp>

Inheritance diagram for gridpack::utility::LocalTimer:
Inheritance graph
[legend]
Collaboration diagram for gridpack::utility::LocalTimer:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 LocalTimer (const gridpack::parallel::Communicator &comm)
 ~LocalTimer ()
int createCategory (const std::string title)
void start (const int idx)
void stop (const int idx)
void dump (void) const
void dump (boost::shared_ptr< std::ofstream > stream) const
void dumpProfile (const int idx) const
void dumpProfile (const std::string title)
double currentTime ()
void configTimer (bool flag)

Constructor & Destructor Documentation

gridpack::utility::LocalTimer::LocalTimer ( const gridpack::parallel::Communicator comm  ) 

Constructor

gridpack::utility::LocalTimer::~LocalTimer (  ) 

Destructor


Member Function Documentation

void gridpack::utility::LocalTimer::configTimer ( bool  flag  ) 

Turn timing on and off. If timing is off, no data is collected.

Parameters:
flag turn timer on (true) or off (false)
int gridpack::utility::LocalTimer::createCategory ( const std::string  title  ) 

Create a new timer category and return a handle to the category. It is up to the application to keep track of this handle.

Parameters:
title the title is the name that will be used to label the timing statistics in the output
Returns:
an integer handle that can be used to refer to this category
double gridpack::utility::LocalTimer::currentTime (  ) 

Return current time. Can be used to solve timing problems that can't be handled using the regular timing capabilities

Returns:
current time in seconds according to internal clock
void gridpack::utility::LocalTimer::dump ( boost::shared_ptr< std::ofstream >  stream  )  const

Write all timing statistics to specified ostream object

void gridpack::utility::LocalTimer::dump ( void   )  const

Write all timing statistics to standard out

void gridpack::utility::LocalTimer::dumpProfile ( const std::string  title  ) 

Write out profile for all processors for requested title

Parameters:
idx category title
void gridpack::utility::LocalTimer::dumpProfile ( const int  idx  )  const

Write out profile for all processors for requested handle

Parameters:
idx category handle
void gridpack::utility::LocalTimer::start ( const int  idx  ) 

Start timing the category

Parameters:
idx category handle
void gridpack::utility::LocalTimer::stop ( const int  idx  ) 

Stop timing the category

Parameters:
idx category handle

The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines

Generated on 3 Feb 2020 for GridPACK by  doxygen 1.6.1